<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>发货</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="__STATIC_URL__/static/mobile/css/weui.css" />
    <link rel="stylesheet" href="/referorder.css" />

    <style>
        .dd-pay-change{
            background-image: url(__STATIC_URL__/static/img/head-bg.png);
            background-size: cover;
            height: 6rem;
            position: relative;

        }
    </style>
</head>
<body>
<div class="container" id="container">
    <div class="dd-pay-change">

    </div>
    <div class="dd-flex">
        <div class="dd-flex-add">
            <img src="__STATIC_URL__/static/img/icon-add.png" alt="">
        </div>
        <a class="weui-cell_access" href="{:url('cardgifts/edituserinfo',['card_id'=>$info['card_id'],'code'=>$info['code']])}">

            <div class="dd-flex-box">
                <h3>{$area['name']}<em>{$area['phone']}</em></h3>
                <p>{$area['area']} {$area['address']}</p>
            </div>
        </a>
    </div>
    <div class="divHeight"></div>
    <div class="dd-flex">

        <div class="dd-shop-item-arrow">
            {$info['brand_name']}
        </div>
    </div>
    <div class="dd-commodity-bg">
        <div class="dd-flex">
            <div class="dd-commodity-img">
                <img src="{$info['logo_url']}" alt="">
            </div>
            <div class="dd-flex-box">
                <h4>礼品名称：{$info['title']}</h4>
                <p>礼品详情：{$info['prerogative']}</p>
            </div>

        </div>
    </div>
    <div class="dingdan">



        <!--<div class="ddlist">-->
        <!--<div class="dtit">物流单号</div>-->
        <!--<div class="dz noblord">中通：TL123012409-1</div>-->
        <!--</div>-->
        <form action="" id="formcate">
            <input type="hidden" name="mid" value="{$info['mid']}">
            <input type="hidden" name="top_mid" value="{$info['top_mid']}">
            <input type="hidden" name="code" value="{$info['code']}">
            <input type="hidden" name="card_id" value="{$info['card_id']}">



        </form>
        {if condition="$info['is_putgift'] == 1"}

        <div class="mgt15 saveinfo" style="margin:40px;">
            <a href="javascript:;" class="weui-btn weui-btn_primary " data-id="" onclick="buts()">发货</a>
        </div>
        {/if}
    </div>

</div>
</div>
<!--toast-->
<div id="toast" style="opacity: 1; display: none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <i class="weui-icon-success-no-circle weui-icon_toast"></i>
        <p class="weui-toast__content">已完成</p>
    </div>
</div>
</body>
<script src="__STATIC_URL__/static/jquery/3.2.1/jquery.min.js"></script>
<script src="__STATIC_URL__/static/layer/layer.js"></script>

<script>
    function buts(){

        $.ajax({
            url: "{:url('')}",
            type: "post",
            data: $("#formcate").serialize(),
            success: function (data) {
                console.log(data);
                if(data.code==0){
                    layer.msg(data.message);
                    setTimeout(function(){
                        window.location.href = data.url;

                    },1500)
                }else{
                    layer.msg(data.message);
                }
            }
        })
    }
</script>
</html>
